﻿public class LdIntAstTree : LuaAstTree
{
    public long Value { get; }
    public LdIntAstTree(long value)
    {
        Value = value;
        ResultType = ObjectKind.Integer;
    }
    public override T GetResult<T>()
    {
        if (Value is T r)
            return r;
        return default;
    }
    public override void WriteTo(ICodeWriter writer)
    {
        writer.Code(Value.ToString());
    }
}
